package com.punai.standard.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.punai.standard.domain.StaGxChapter;
import com.punai.standard.domain.template.StaGxChapterExcel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工序章节Mapper接口
 *
 * @author zxw
 * @date 2022-12-13
 */
public interface StaGxChapterMapper extends BaseMapper<StaGxChapter>
{
    /**
     * 查询工序章节
     *
     * @param id 工序章节主键
     * @return 工序章节
     */
    public StaGxChapter selectStaGxChapterById(@Param("versionId")String versionId, @Param("id")String id);

    /**
     * 查询工序章节列表
     *
     * @param staGxChapter 工序章节
     * @return 工序章节集合
     */
    public List<StaGxChapter> selectStaGxChapterList(StaGxChapter staGxChapter);

    List<StaGxChapter> selectExport(@Param("versionId") String versionId);

    List<StaGxChapterExcel> selectExportExcel(@Param("versionId") String versionId);


    /**
     * 删除工序章节
     *
     * @param id 工序章节主键
     * @return 结果
     */
    public int deleteStaGxChapterById(String id);

    /**
     * 批量删除工序章节
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStaGxChapterByIds(String[] ids);

    List<StaGxChapter> getChildByPid(@Param("pid") String pid,@Param("versionId") String versionId);

    List<String> selectChildIdById(@Param("id") String id,@Param("versionId") String versionId);

    public List<StaGxChapter> queryContrast(@Param("versionId")String versionId, @Param("ids") String[] ids);

    List<String> selectAddressByVersionId(@Param("versionId") String versionId);
}
